/* Snackbar - Toast */

.snackbar,
.toast {
    box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.23), 0px 3px 10px rgba(0, 0, 0, 0.16);
    position: fixed;
    z-index: 4;
    min-height: 6rem;
    max-height: 11rem;
    width: 48rem;
    height: auto;
    color: white;
    padding: 2rem 3rem;
    box-sizing: border-box;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.4s ease;
    background-color: var(--movim-gray);
    transform: translateY(0);
    bottom: 3rem;
}

body.nightmode .snackbar,
body.nightmode .toast {
    background-color: var(--movim-background);
}

.toast,
.snackbar p {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.snackbar > a {
    pointer-events: auto;
    margin: -1rem -2rem;
    display: block;
    margin: -2rem -1rem;
    padding: 2rem 1rem;
}

.snackbar > a:hover {
    border: 3px solid rgba(255, 255, 255, 0.2);
    padding: calc(2rem - 3px) calc(1rem - 3px);
}

.snackbar {
    right: 2.8rem;
    border-radius: 0.25rem;
    opacity: 1;
    padding: 2rem 1rem;
}

.toast {
    left: calc(50% - 24rem);
    line-height: 2.5rem;
    border-radius: 0.75rem;
}

.snackbar:empty,
.toast:empty {
    opacity: 0;
    transform: translateY(100%);
}

.snackbar#status_websocket {
    max-height: initial;
}

.snackbar#status_websocket p {
    line-height: 2.55rem;
    white-space: initial;
}

.snackbar#status_websocket:not(.hide) ~ main,
.snackbar#status_websocket:not(.hide) ~ div.dialog {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(1);
}

.snackbar#status_websocket:not(.hide) ~ div.drawer {
    opacity: 0;
}

.snackbar#status_websocket span.control {
    right: 0;
}

.snackbar#status_websocket:not(.connect) span.control:nth-child(1),
.snackbar#status_websocket.connect span.control:nth-child(2),
.snackbar#status_websocket:not(.connect) p:nth-child(3),
.snackbar#status_websocket.connect p:nth-child(4) {
    display: none;
}

@media screen and (max-width: 1024px) {
    .snackbar,
    .toast {
        bottom: 7.5rem;
    }
}

@media screen and (max-width: 576px) {
    .snackbar,
    .toast {
        left: 1rem;
        width: calc(100% - 2rem);
    }
}
